/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ifrr.gepro.estoria.bean;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author rafael
 */
@Entity
@Table(name = "situacao", catalog = "gepro", schema = "public")
public class SituacaoEstoriaBean implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id_situacao", nullable = false, insertable=false)
    private Integer id;
    @Column(name = "descricao", length = 250)
    private String descricao;
//    @OneToMany(mappedBy = "fkSituacao")
//    private Collection<EstoriasBean> estoriasBeanCollection;

    public SituacaoEstoriaBean() {
    }

    public SituacaoEstoriaBean(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

//    public Collection<EstoriasBean> getEstoriasBeanCollection() {
//        return estoriasBeanCollection;
//    }
//
//    public void setEstoriasBeanCollection(Collection<EstoriasBean> estoriasBeanCollection) {
//        this.estoriasBeanCollection = estoriasBeanCollection;
//    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SituacaoEstoriaBean)) {
            return false;
        }
        SituacaoEstoriaBean other = (SituacaoEstoriaBean) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.ifrr.gepro.SituacaoEstoriaBean[ id=" + id + " ]";
    }
    
}
